/*
 * @Author: 尔尔
 * @Date: 2023-12-15 11:28:17
 * @LastEditors: 尔尔
 * @LastEditTime: 2024-04-18 11:56:21
 * @FilePath: \ERP\src\api\repair\repairProduct.js
 * @filePurpose:
 */
import request from "@/utils/request"

// 查询返修单产品列列表
export function listRepairProduct(query) {
	return request({
		url: "/erp/repairProduct/list",
		method: "get",
		params: query
	})
}

// 查询返修单产品列列表
export function listRepairProduct1(query) {
	return request({
		url: "/erp/repairProduct/list1",
		method: "get",
		params: query
	})
}

// 查询返修单产品列详细
export function getRepairProduct(id) {
	return request({
		url: "/erp/repairProduct/" + id,
		method: "get"
	})
}

// 新增返修单产品列
export function addRepairProduct(data) {
	return request({
		url: "/erp/repairProduct",
		method: "post",
		data: data
	})
}

// 修改返修单产品列
export function updateRepairProduct(data) {
	return request({
		url: "/erp/repairProduct",
		method: "put",
		data: data
	})
}

// 删除返修单产品列
export function delRepairProduct(id) {
	return request({
		url: "/erp/repairProduct/" + id,
		method: "delete"
	})
}

// 获取返修单下所有产品id
export function repairProductList(id) {
	return request({
		url: "/erp/repairProduct/repair/" + id,
		method: "get"
	})
}

// 分配工段
export function batchDistributionStation(data) {
	return request({
		url: "/erp/repairProduct/batchDistributionStation",
		method: "post",
		data: data
	})
}

// 批量分配工段
export function distributionStation(data) {
	return request({
		url: "/erp/repairProduct/distributionStation",
		method: "post",
		data: data
	})
}

// 获取返修单产品分配详细信息
export function repairProductDetails(id) {
	return request({
		url: "/erp/repairProduct/repairProductDetails/" + id,
		method: "get"
	})
}


// 查询产品列列表
export function listProduct(query) {
  return request({
    url: '/erp/product/list1',
    method: 'get',
    params: query
  })
}

// 产品下拉框

export function productLists() {
  return request({
    url: '/erp/selectDown/productList',
    method: 'get'
  })
}
